import { i18nRender } from '@/locales'

/**
 * 受试者状态  0 待筛选  1 筛选中 2
1：带筛选状态
2：筛选中
3：筛选失败
4：随机
5：治疗中
6：退出
7：治疗结束
8：安全性随访
9：生存随访
 */
export const PTS_STATUS = {
  DAISHAIXUAN: {
    value: 1,
    desc: i18nRender('all.autotext836')
  },
  SHAIXUANZHONG: {
    value: 2,
    desc: i18nRender('all.autotext680')
  },
  SHAIXUANSHIBAI: {
    value: 3,
    desc: i18nRender('all.autotext978')
  },
  SUIJI: {
    value: 4,
    desc: i18nRender('all.autotext110')
  },
  ZHILIAOZHONG: {
    value: 5,
    desc: i18nRender('all.autotext985')
  },
  TUICHU: {
    value: 6,
    desc: i18nRender('all.autotext86')
  },
  ZHILIAOJIESHU: {
    value: 7,
    desc: i18nRender('all.autotext1109')
  },
  ANQUANXINGSUIFANG: {
    value: 8,
    desc: i18nRender('all.autotext691')
  },
  SHENGCUNSUIFANG: {
    value: 9,
    desc: i18nRender('all.autotext1163')
  }
}
// 邀请状态（团队成员）
export const INVITATION_STATUS = {
  INVITED: {
    value: 1,
    desc: i18nRender('all.autotext1026')
  },
  JOINED: {
    value: 2,
    desc: i18nRender('all.autotext1415')
  }
}
// 研究中心状态
export const RESEARCH_CENTER_STATUS = {
  ACTIVE: {
    value: 1,
    desc: i18nRender('all.autotext193')
  },
  INACTIVE: {
    value: 2,
    desc: i18nRender('all.autotext892')
  }
}
// 研究中心邀请成员状态
export const CENTER_MEMBER_STATUS = {
  SUBJECT: {
    value: 1,
    desc: i18nRender('all.autotext220')
  },
  REJECT: {
    value: 2,
    desc: i18nRender('all.autotext1072')
  },
  WAITING: {
    value: 3,
    desc: i18nRender('all.autotext609')
  },
  JOIN: {
    value: 4,
    desc: i18nRender('all.autotext201')
  }
}
// 签署状态
export const SIGNING_STATUS = {
  NO_SIGNING: {
    value: 1,
    desc: i18nRender('all.autotext204')
  },
  NO_UPLOAD: {
    value: 2,
    desc: i18nRender('all.autotext1043')
  },
  SIGNING: {
    value: 3,
    desc: i18nRender('all.autotext1363')
  },
  UPLOAD: {
    value: 4,
    desc: i18nRender('all.autotext504')
  },
  CANCELLED: {
    value: 5,
    desc: i18nRender('all.autotext1380')
  }
}
// 研究分期
export const SPONSOR_STAGE = {
  FIRST_STAGE: {
    value: 1,
    desc: 'I' + i18nRender('all.autotext325')
  },
  SECOND_STAGE: {
    value: 2,
    desc: 'II' + i18nRender('all.autotext325')
  },
  THIRD: {
    value: 3,
    desc: 'III' + i18nRender('all.autotext325')
  },
  FOURTH_STAGE: {
    value: 4,
    desc: 'IV' + i18nRender('all.autotext325')
  },
  OTHERS: {
    value: 5,
    desc: i18nRender('all.autotext579')
  },
  BE: {
    value: 6,
    desc: 'BE'
  }
}
export const SIGN_TYPES = {
  ACTIVE: {
    value: 1,
    desc: i18nRender('all.autotext1315')
  },
  INACTIVE: {
    value: 2,
    desc: i18nRender('all.autotext339')
  }
}

export const TEXT_SIGN_TYPE = [
  { id: 'EP_SIGN_RSC_NAME', name: `${i18nRender('all.autotext945')}-${i18nRender('all.autotext1096')}-${i18nRender('all.autotext977')}` },
  { id: 'EP_SIGN_RSC_ID_CARD', name: `${i18nRender('all.autotext945')}-${i18nRender('all.autotext1096')}-${i18nRender('all.autotext936')}` },
  { id: 'EP_SIGN_RSC_PHONE', name: `${i18nRender('all.autotext945')}-${i18nRender('all.autotext1096')}-${i18nRender('all.autotext709')}` },
  { id: 'EP_RSC_HOSPITAL_NAME', name: `${i18nRender('all.autotext1096')}-${i18nRender('all.autotext1058')}` },
  { id: 'EP_RSC_HOSPITAL_DEPT', name: `${i18nRender('all.autotext1096')}-${i18nRender('all.autotext335')}` },
  { id: 'EP_PROJECT_SPONSOR', name: i18nRender('all.autotext233') },
  { id: 'EP_PROJECT_NAME', name: `${i18nRender('all.autotext649')}-${i18nRender('all.autotext348')}` },
  { id: 'EP_PROJECT_NO', name: `${i18nRender('all.autotext649')}-${i18nRender('all.autotext1142')}` },
  { id: 'EP_PROJECT_PROTOCOL_NO', name: `${i18nRender('all.autotext649')}-${i18nRender('all.autotext873')}` },
  { id: 'INPUT_TEXT', name: i18nRender('all.autotext179') }
]

// 证件类型
export const DOCUMENT_TYPE = {
  ID: {
    value: 1,
    desc: i18nRender('all.autotext689')
  },
  XGPASS: {
    value: 2,
    desc: i18nRender('all.autotext1328')
  },
  PASSPORT: {
    value: 3,
    desc: i18nRender('all.autotext144')
  },
  AMPASS: {
    value: 4,
    desc: i18nRender('all.autotext819')
  },
  TWPASS: {
    value: 5,
    desc: i18nRender('all.autotext27')
  }
}
// 证件类型
export const GENDER_TYPE = {
  GIRL: {
    value: 0,
    desc: i18nRender('all.autotext1218')
  },
  BOY: {
    value: 1,
    desc: i18nRender('all.autotext1007')
  },
  none: {
    value: -1,
    desc: i18nRender('all.autotext1048')
  }
}
// 监护人类型
export const GUARDIAN_TYPE = {
  GIRL: {
    value: 1,
    desc: i18nRender('all.autotext314')
  },
  BOY: {
    value: 2,
    desc: i18nRender('all.autotext1388')
  },
  none: {
    value: 3,
    desc: i18nRender('all.autotext1274')
  }
}
// 与受试者关系
export const RELATION_TYPE = {
  PARENT: {
    value: 1,
    desc: i18nRender('all.autotext22')
  },
  CHILDREN: {
    value: 2,
    desc: i18nRender('all.autotext372')
  },
  SPOUSE: {
    value: 3,
    desc: i18nRender('all.autotext406')
  },
  RELATIVE: {
    value: 4,
    desc: i18nRender('subject.autotext18')
  },
  GRANDPARENTS: {
    value: 5,
    desc: i18nRender('subject.autotext19')
  },
  GRANDPARENTSINLAW: {
    value: 6,
    desc: i18nRender('subject.autotext20')
  },
  GRANDCHILD: {
    value: 7,
    desc: i18nRender('subject.autotext21')
  },
  OTHERS: {
    value: 8,
    desc: i18nRender('all.autotext579')
  }
}
// 签署方式
export const SIGN_TYPE = {
  PAPER: {
    value: 1,
    desc: i18nRender('all.autotext295')
  },
  ELECTRON: {
    value: 2,
    desc: i18nRender('all.autotext525')
  }
}
// 受试者关联微信状态
export const RELATION_WX = {
  ACCEPT: {
    value: 1,
    desc: i18nRender('all.autotext242'),
    style: 'color: #0F121B'
  },
  REFUSE: {
    value: 2,
    desc: i18nRender('all.autotext1072'),
    style: 'color: #F02F2F'
  },
  PENDING: {
    value: 3,
    desc: i18nRender('all.autotext609'),
    style: 'color: #FDB62B'
  },
  JOIN: {
    value: 4,
    desc: i18nRender('all.autotext201'),
    style: 'color: #43D882'
  },
  INVITE: {
    value: 5,
    desc: i18nRender('all.autotext1399'),
    style: 'color: #43D882'
  }
}

// 研究者关联微信状态
export const PI_WX = {
  ACCEPT: {
    value: 1,
    desc: i18nRender('all.autotext220'),
    style: 'color: #0F121B'
  },
  INVITE: {
    value: 2,
    desc: i18nRender('all.autotext1399'),
    style: 'color: #43D882'
  },
  PENDING: {
    value: 3,
    desc: i18nRender('all.autotext609'),
    style: 'color: #FDB62B'
  },
  JOIN: {
    value: 4,
    desc: i18nRender('all.autotext201'),
    style: 'color: #43D882'
  }
}

// 受试者状态
export const RELATION_STATUS = {
  FILTERING: {
    value: 2,
    desc: i18nRender('all.autotext680')
  },
  FAIL: {
    value: 3,
    desc: i18nRender('all.autotext978')
  },
  RANDOM: {
    value: 4,
    desc: i18nRender('all.autotext1075')
  },
  EXIT: {
    value: 6,
    desc: i18nRender('subject.autotext17')
  },
  END: {
    value: 7,
    desc: i18nRender('all.autotext6')
  }
}

// 费用申请状态
export const COST_TYPES = {
  SUBMIT: {
    value: 10,
    desc: i18nRender('all.autotext721')
  },
  INFO: {
    value: 20,
    desc: i18nRender('all.autotext476')
  },
  CHECKED: {
    value: 30,
    desc: i18nRender('all.autotext934')
  },
  CHECKING: {
    value: 31,
    desc: i18nRender('all.autotext230')
  },
  EXIT: {
    value: -1,
    desc: i18nRender('all.autotext1010')
  },
  STOCK: {
    value: 41,
    desc: i18nRender('all.autotext715')
  },
  PAYED: {
    value: 50,
    desc: i18nRender('all.autotext407')
  },
  PAYING: {
    value: 51,
    desc: i18nRender('all.autotext115')
  },
  SUCCESS: {
    value: 60,
    desc: i18nRender('all.autotext6')
  }
}
export const CONTRACT_STATUS = {
  CLOSED: {
    value: 0,
    desc: i18nRender('all.autotext764')
  },
  START: {
    value: 1,
    desc: i18nRender('all.autotext307')
  }
}

// 邀请记录 邀请状态
export const INVITED_STATUS = {
  TO_BE_INVITED: {
    value: 0,
    desc: i18nRender('all.autotext1399')
  },
  INVITED: {
    value: 1,
    desc: i18nRender('all.autotext201')
  },
  ACCEPT: {
    value: 2,
    desc: i18nRender('all.autotext242')
  }
}

export default {
  PTS_STATUS,
  SIGNING_STATUS,
  SPONSOR_STAGE,
  INVITATION_STATUS,
  RESEARCH_CENTER_STATUS,
  CENTER_MEMBER_STATUS,
  SIGN_TYPES,
  TEXT_SIGN_TYPE,
  DOCUMENT_TYPE,
  GENDER_TYPE,
  GUARDIAN_TYPE,
  RELATION_TYPE,
  SIGN_TYPE,
  RELATION_WX,
  RELATION_STATUS,
  COST_TYPES,
  CONTRACT_STATUS,
  PI_WX,
  INVITED_STATUS
}
